-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🏗️ Persist the session #372
Conversation
Every call of |
Ahhh, thanks for the hint! I moved this logic over to lndb-setup and I'll think what to do about this! |
My current thought is that the main thing this means is that we need to mutual exclusion check for the sqlite file. And we might need more control for influencing synching for the user. |
The problem with storing the session is that the db file is synchronized only once on session initialization. Actually, this change might break a lot of things. For example, if the cached db file is deleted, it won't be synchronized anymore as far as i understand. |
I’ll walk you through it. And if there is another solution, then that’d be great. |
To note: In the current implementation, the old behavior (function-scoped sessions) is just an environment variable away. So, we can just switch it back anytime. |
We can do that, with some caveats; let’s try scoping both the session and the cache check with the |
Mutual exclusion is not meaningful in this setting, because we don't get any changes from the cloud until new init call where new session is received. |
session()
toInstanceSettings
lamindb-setup#99